package com.acme.task2;

public class GCTest {
	public static void main(String[] args) {
        //GC starts to work when number of iterations is about 1kk
		int numberOfIterations = 10000000;

        Foo[] fooArray = new Foo[numberOfIterations];

        //OutOfMemoryError indeed
		for (int i = 0; i < numberOfIterations; i++) {
			fooArray[i] = new Foo(i);
		}


	}
}
